package com.mudalov.rec.dao.hibernate.impl;

import java.util.List;
import org.hibernate.SessionFactory;

import com.mudalov.rec.dao.interfaces.HbnGenericDAO;
import com.mudalov.rec.dao.interfaces.ISubjectDAO;
import com.mudalov.rec.dao.model.study.Subject;
import java.util.ArrayList;
import org.hibernate.criterion.Criterion;

public class HbnSubjectDAO extends HbnGenericDAO<Subject, Long> implements
		ISubjectDAO {

	public HbnSubjectDAO(SessionFactory sesssionFactory) {
		this.sessionFactory = sesssionFactory;
	}

	@Override
	protected Class<Subject> getEntityClass() {
		return Subject.class;
	}

    public List<Subject> getSubjects() {
        return findDetachedObjectsByCriteria(new ArrayList<Criterion>());
    }
}
